<?php $this->context->layout = 'form';?>
<style>
    #pathss{
        width: 50% !important;
        display: inline !important;
    }
</style>
<form class="form-horizontal m" id="form-admin-add">
    <?= \common\widgets\FormInput::widget(['name'=>'input','extend'=>['name'=>'id','type'=>'hidden','info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'input','extend'=>['name'=>'name','info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'image|图片','extend'=>['data'=>$info['icon'],'link'=>'false','name'=>'imgarr1','id'=>'uploadimgbtn1','required'=>1,'script_after'=>'1','cat'=>'bmimage','water'=>'true','sm'=>3]])?>
    <input type="hidden" name="icon" id="img1" value="">
    <?= \common\widgets\FormInput::widget(['name'=>'forminput|排序','extend'=>['name'=>'sort','type'=>'number','tips'=>'排序值越大越靠前','info'=>$info]])?>
    <?= \common\widgets\FormInput::widget(['name'=>'formradio|状态','extend'=>['name'=>'status','required'=>1,'info'=>$info]])?>
</form>

<?php $this->beginBlock('script'); ?>
<script>
    function submitHandler() {
        if ($.validate.form()) {
            imgassign("input[name='imgarr1[]']",'#img1')
            $.operate.save(oesUrl, $('#form-admin-add').serialize());
        }
    }

</script>
<?php $this->endBlock(); ?>
